<%-- 
    Document   : listarPeliculas
    Created on : 15-dic-2011, 1:24:16
    Author     : Administrador
--%>

<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <div id="bodydiv">
            <span style="color: #0395CC; margin-top: 20px; font-size: 20pt; font-family: Arial;"><b>lista de peliculas</b></span>
            <hr />
            <br />
            <c:if test="${not empty sessionScope.peliculas}">
                <table border="0">
                    <tr>
                        <td style="width: 240px; background:#a52a2a; color: #FFFFFF; border: 1px solid #444444; text-align: center;"><b>Nombre</b></td>
                        <td style="width: 120px; background:#a52a2a; color: #FFFFFF; border: 1px solid #444444; text-align: center;"><b>Fecha estreno</b></td>
                        <td style="width: 120px; background:#a52a2a; color: #FFFFFF; border: 1px solid #444444; text-align: center;"><b>Proyeccion</b></td>
                        <td style="width: 120px; background:#a52a2a; color: #FFFFFF; border: 1px solid #444444; text-align: center;"><b>Idioma</b></td>
                        <td style="width: 100px; background:#a52a2a; color: #FFFFFF; border: 1px solid #444444; text-align: center;"><b>Seleccione</b></td>
                    </tr>
                    <c:forEach var="pelicula" items="${sessionScope.peliculas}">
                        <tr>

                            <td>${pelicula.nombre}</td>
                            <td><fmt:formatDate value="${pelicula.fechaEstreno}" dateStyle="medium" pattern="dd/MM/yyyy"></fmt:formatDate></td>
                            <td>${pelicula.tipoProyeccion}
                            <td>${pelicula.idioma}</td>
                            <td><a href="obtenerPelicula?idPelicula=${pelicula.id}" style="color:#0395CC; text-decoration:none">agregar funcion</a>
                        </tr>
                    </c:forEach>
                </table>
            </c:if>
            <c:if test="${not empty requestScope.error}">
                <span style="color: red">${requestScope.error}</span>
                <c:remove scope="request" var="error" />
            </c:if>
        </div>
        <jsp:include page="index.jsp" />
    </body>
</html>
